\(\int \log (c (d+e (f+g x))^q) \, dx\) [631]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 35 \[ \int \log \left (c (d+e (f+g x))^q\right ) \, dx=-q x+\frac {(d+e f+e g x) \log \left (c (d+e (f+g x))^q\right )}{e g} \]

[Out]

-q*x+(e*g*x+e*f+d)*ln(c*(d+e*(g*x+f))^q)/e/g

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {2494, 2436, 2332} \[ \int \log \left (c (d+e (f+g x))^q\right ) \, dx=\frac {(d+e f+e g x) \log \left (c (d+e (f+g x))^q\right )}{e g}-q x \]

[In]

Int[Log[c*(d + e*(f + g*x))^q],x]

[Out]

-(q*x) + ((d + e*f + e*g*x)*Log[c*(d + e*(f + g*x))^q])/(e*g)

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2436

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2494

Int[((a_.) + Log[(c_.)*(v_)^(n_.)]*(b_.))^(p_.)*(u_.), x_Symbol] :> Int[u*(a + b*Log[c*ExpandToSum[v, x]^n])^p
, x] /; FreeQ[{a, b, c, n, p}, x] && LinearQ[v, x] &&  !LinearMatchQ[v, x] &&  !(EqQ[n, 1] && MatchQ[c*v, (e_.
)*((f_) + (g_.)*x) /; FreeQ[{e, f, g}, x]])

Rubi steps \begin{align*} \text {integral}& = \int \log \left (c (d+e f+e g x)^q\right ) \, dx \\ & = \frac {\text {Subst}\left (\int \log \left (c x^q\right ) \, dx,x,d+e f+e g x\right )}{e g} \\ & = -q x+\frac {(d+e f+e g x) \log \left (c (d+e (f+g x))^q\right )}{e g} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.34 \[ \int \log \left (c (d+e (f+g x))^q\right ) \, dx=-q x+\frac {d q \log (d+e f+e g x)}{e g}+\frac {(f+g x) \log \left (c (d+e (f+g x))^q\right )}{g} \]

[In]

Integrate[Log[c*(d + e*(f + g*x))^q],x]

[Out]

-(q*x) + (d*q*Log[d + e*f + e*g*x])/(e*g) + ((f + g*x)*Log[c*(d + e*(f + g*x))^q])/g

Maple [A] (verified)

Time = 0.52 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.34

method result size
norman \(x \ln \left (c \,{\mathrm e}^{q \ln \left (d +\left (g x +f \right ) e \right )}\right )+\frac {q \left (e f +d \right ) \ln \left (d +\left (g x +f \right ) e \right )}{e g}-q x\) \(47\)
default \(\ln \left (c \left (e g x +e f +d \right )^{q}\right ) x -q e g \left (\frac {x}{g e}+\frac {\left (-e f -d \right ) \ln \left (e g x +e f +d \right )}{e^{2} g^{2}}\right )\) \(57\)
parts \(\ln \left (c \left (d +\left (g x +f \right ) e \right )^{q}\right ) x -q e g \left (\frac {x}{g e}+\frac {\left (-e f -d \right ) \ln \left (e g x +e f +d \right )}{e^{2} g^{2}}\right )\) \(57\)
parallelrisch \(\frac {2 \ln \left (e g x +e f +d \right ) e f q +x \ln \left (c \left (e g x +e f +d \right )^{q}\right ) e g -g e q x +2 \ln \left (e g x +e f +d \right ) d q -\ln \left (c \left (e g x +e f +d \right )^{q}\right ) e f +e f q -d \ln \left (c \left (e g x +e f +d \right )^{q}\right )+d q}{e g}\) \(104\)
risch \(x \ln \left (\left (e g x +e f +d \right )^{q}\right )+\frac {i \pi x \,\operatorname {csgn}\left (i \left (e g x +e f +d \right )^{q}\right ) \operatorname {csgn}\left (i c \left (e g x +e f +d \right )^{q}\right )^{2}}{2}-\frac {i \pi x \,\operatorname {csgn}\left (i \left (e g x +e f +d \right )^{q}\right ) \operatorname {csgn}\left (i c \left (e g x +e f +d \right )^{q}\right ) \operatorname {csgn}\left (i c \right )}{2}-\frac {i \pi x \operatorname {csgn}\left (i c \left (e g x +e f +d \right )^{q}\right )^{3}}{2}+\frac {i \pi x \operatorname {csgn}\left (i c \left (e g x +e f +d \right )^{q}\right )^{2} \operatorname {csgn}\left (i c \right )}{2}+x \ln \left (c \right )+\frac {\ln \left (e g x +e f +d \right ) f q}{g}-q x +\frac {\ln \left (e g x +e f +d \right ) d q}{e g}\) \(189\)

[In]

int(ln(c*(d+(g*x+f)*e)^q),x,method=_RETURNVERBOSE)

[Out]

x*ln(c*exp(q*ln(d+(g*x+f)*e)))+q*(e*f+d)/e/g*ln(d+(g*x+f)*e)-q*x

Fricas [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.31 \[ \int \log \left (c (d+e (f+g x))^q\right ) \, dx=-\frac {e g q x - e g x \log \left (c\right ) - {\left (e g q x + {\left (e f + d\right )} q\right )} \log \left (e g x + e f + d\right )}{e g} \]

[In]

integrate(log(c*(d+e*(g*x+f))^q),x, algorithm="fricas")

[Out]

-(e*g*q*x - e*g*x*log(c) - (e*g*q*x + (e*f + d)*q)*log(e*g*x + e*f + d))/(e*g)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 80 vs. \(2 (29) = 58\).

Time = 0.29 (sec) , antiderivative size = 80, normalized size of antiderivative = 2.29 \[ \int \log \left (c (d+e (f+g x))^q\right ) \, dx=\begin {cases} x \log {\left (c d^{q} \right )} & \text {for}\: e = 0 \wedge \left (e = 0 \vee g = 0\right ) \\x \log {\left (c \left (d + e f\right )^{q} \right )} & \text {for}\: g = 0 \\\frac {d \log {\left (c \left (d + e f + e g x\right )^{q} \right )}}{e g} + \frac {f \log {\left (c \left (d + e f + e g x\right )^{q} \right )}}{g} - q x + x \log {\left (c \left (d + e f + e g x\right )^{q} \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(ln(c*(d+e*(g*x+f))**q),x)

[Out]

Piecewise((x*log(c*d**q), Eq(e, 0) & (Eq(e, 0) | Eq(g, 0))), (x*log(c*(d + e*f)**q), Eq(g, 0)), (d*log(c*(d +
e*f + e*g*x)**q)/(e*g) + f*log(c*(d + e*f + e*g*x)**q)/g - q*x + x*log(c*(d + e*f + e*g*x)**q), True))

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.54 \[ \int \log \left (c (d+e (f+g x))^q\right ) \, dx=-e g q {\left (\frac {x}{e g} - \frac {{\left (e f + d\right )} \log \left (e g x + e f + d\right )}{e^{2} g^{2}}\right )} + x \log \left ({\left ({\left (g x + f\right )} e + d\right )}^{q} c\right ) \]

[In]

integrate(log(c*(d+e*(g*x+f))^q),x, algorithm="maxima")

[Out]

-e*g*q*(x/(e*g) - (e*f + d)*log(e*g*x + e*f + d)/(e^2*g^2)) + x*log(((g*x + f)*e + d)^q*c)

Giac [A] (verification not implemented)

none

Time = 0.35 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.83 \[ \int \log \left (c (d+e (f+g x))^q\right ) \, dx=\frac {{\left (e g x + e f + d\right )} q \log \left (e g x + e f + d\right )}{e g} - \frac {{\left (e g x + e f + d\right )} q}{e g} + \frac {{\left (e g x + e f + d\right )} \log \left (c\right )}{e g} \]

[In]

integrate(log(c*(d+e*(g*x+f))^q),x, algorithm="giac")

[Out]

(e*g*x + e*f + d)*q*log(e*g*x + e*f + d)/(e*g) - (e*g*x + e*f + d)*q/(e*g) + (e*g*x + e*f + d)*log(c)/(e*g)

Mupad [B] (verification not implemented)

Time = 1.42 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.31 \[ \int \log \left (c (d+e (f+g x))^q\right ) \, dx=x\,\ln \left (c\,{\left (d+e\,\left (f+g\,x\right )\right )}^q\right )-q\,x+\frac {\ln \left (d+e\,f+e\,g\,x\right )\,\left (d\,q+e\,f\,q\right )}{e\,g} \]

[In]

int(log(c*(d + e*(f + g*x))^q),x)

[Out]

x*log(c*(d + e*(f + g*x))^q) - q*x + (log(d + e*f + e*g*x)*(d*q + e*f*q))/(e*g)